﻿using Microsoft.EntityFrameworkCore;
using WidgetsDesign.API.Dtos;
using WidgetsDesign.API.Models;

namespace WidgetsDesign.API.DataBase
{
    public class AppDbContext : DbContext
    {
        public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
        {



        }


        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<RiskRepositoryModel>().ToTable("work_safety_analysis_library").HasKey(c => c.Id);
            base.OnModelCreating(modelBuilder);
        }

        public DbSet<RiskRepositoryModel> RiskRepository { get; set; }
        public DbSet<EmployeeModel> employees { get; set; }
        public DbSet<TrainModel> train { get; set; }
        public DbSet<MeetingModel> meeting { get; set; }
        public DbSet<CraneOperationModel> craneoperation { get; set; }
        public DbSet<VerificationCodeModel> VerificationCode { get; set; }
        public DbSet<DisplayBoardModel> displayboard { get; set; }
        public DbSet<UserInfo> UserInfo { get; set; }
        public DbSet<UploadFile> UploadFile { get; set; }
        public DbSet<WidgetsList> WidgetsList { get; set; }
        public DbSet<RechargeCard> RechargeCard { get; set; }
        public DbSet<RechargeRecord> RechargeRecord { get; set; }
        public DbSet<Dict> DictData { get; set; }
        /// <summary>
        /// 七个表引入
        /// </summary>
        public DbSet<zyxk_confinedspaceModel> zyxk_confinedspace { get; set; }
        public DbSet<zyxk_fireModel> zyxk_fire { get; set; }
        public DbSet<zyxk_groundbreakModel> zyxk_groundbreak{ get; set; }
        public DbSet<zyxk_highModel> zyxk_high { get; set; }
        public DbSet<zyxk_pipelineopenedModel> zyxk_pipelineopened { get; set; }
        public DbSet<zyxk_rayModel> zyxk_ray { get; set; }
        public DbSet<zyxk_tempeleModel> zyxk_tempele { get; set; }
    }
}
